<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link href="__TPLPATH__/Admin/CustomMenu/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="__TPLPATH__/Admin/CustomMenu/css/demo.css" rel="stylesheet"/>
    <link href="__TPLPATH__/Admin/CustomMenu/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="__TPLPATH__/Admin/CustomMenu/css/meezao.css" rel="stylesheet"/>
    <link href="__TPLPATH__/Admin/CustomMenu/css/base.css" rel="stylesheet"/>
    <link href="__TPLPATH__/Admin/CustomMenu/css/d_menu.css" rel="stylesheet"/>
    <link href="__TPLPATH__/Admin/CustomMenu/css/pic.css" rel="stylesheet"/>

    <script src="__TPLPATH__/Admin/CustomMenu/js/jquery-1.11.1.min.js"></script>
    <script src="__TPLPATH__/Admin/CustomMenu/js/jquery.js"></script>
    <script src="__TPLPATH__/Admin/CustomMenu/js/bootstrap.min.js"></script>
    <script src="__TPLPATH__/Admin/CustomMenu/js/meezao.js"></script>
    <script type="text/javascript">
        //下面用于图片上传预览功能
        function setImagePreview(avalue) {
            var docObj=document.getElementById("doc");
            var imgObjPreview=document.getElementById("preview");
            if(docObj.files &&docObj.files[0])
            {
//火狐下，直接设img属性
                imgObjPreview.style.display = 'inline-block';
                imgObjPreview.style.width = '80px';
                imgObjPreview.style.height = '80px';
//imgObjPreview.src = docObj.files[0].getAsDataURL();

//火狐7以上版本不能用上面的getAsDataURL()方式获取，需要一下方式
                imgObjPreview.src = window.URL.createObjectURL(docObj.files[0]);
                console.log(docObj.value);
                $(".MsgSend_media_box").eq(1).hide();
                $(".img_p_div").show();
            }
            else
            {
//IE下，使用滤镜
                docObj.select();
//var imgSrc = document.selection.createRange().text;
                var localImagId = document.getElementById("localImag");
//必须设置初始大小
                localImagId.style.width = "80px";
                localImagId.style.height = "80px";
//图片异常的捕捉，防止用户修改后缀来伪造图片
                try{
                    localImagId.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
                    localImagId.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgSrc;
                }
                catch(e)
                {
                    alert("您上传的图片格式不正确，请重新选择!");
                    return false;
                }
                imgObjPreview.style.display = 'none';
                document.selection.empty();
            }
            return true;
        }

    </script>

</head>
<body class="d_menu">
<div class="wrp">
    <div class="header">

      <include file="MeeZao/Header"/>
    </div>
    <div class="content">
        <include file="MeeZao/Nav"/>

        <div class="main_content">
            <div class="main_content_hb">首页>微信管理系统>微信平台管理系统>自定义菜单</div>
            <div class="main_content_mb">

                <h2 class="main_content_title">自定义菜单</h2>
                <div class="menu_setting_box">
                    <div class="page_msg">
                        <p>菜单编辑中</p>
                        <p>菜单未发布，可点击"保存并发布"同步到手机。若停用菜单，请点击这里。</p>
                    </div>
                    <p class="menu_setting_tips">可添加最多3个一级菜单，每个一级菜单可添加最多5个子菜单</p>
                    <div class="menu_preview_area">
                        <div class="mobile_menu_preview">
                            <div class="mobile_hd tc">蜜枣网内测</div>
                            <div class="mobile_bd">
                                <ul class="pre_menu_list" id="menuList">
                                    <li class="jsMenu pre_menu_item jslevel1 size1of3 " id="z_m_1">
                                        <a href="javascript:void(0);" class="pre_menu_link" draggable="false">
                                            <i class="icon_menu_dot js_icon_menu_dot dn" style="display: none;"></i>
                                            <i class="icon20_common sort_gray"></i>
                                            <span class="js_l1Title">菜单名称</span>
                                        </a>
                                        <div class="sub_pre_menu_box">
                                            <ul class="sub_pre_menu_list">
                                                <li class="jslevel2" id="j_m_1_0">
                                                    <a href="javascript:void(0);" class="jsSubView" draggable="false">
                                             <span class="sub_pre_menu_inner js_sub_pre_menu_inner">
                                                <i class="icon20_common sort_gray"></i>
                                                <span class="js_l2Title">子菜单名称</span>
                                            </span>
                                                    </a>
                                                </li>
                                                <li class="js_addMenuBox add_menu2">
                                                    <a href="javascript:void(0);" class="jsSubView" title="添加子菜单" draggable="false"><span class="sub_pre_menu_inner js_sub_pre_menu_inner"><i class="icon16_common add_gray"></i></span></a>
                                                </li>
                                            </ul>
                                            <i class="arrow arrow_out"></i>
                                            <i class="arrow arrow_in"></i>
                                        </div>
                                    </li>
                                    <li class="jsMenu pre_menu_item jslevel1 size1of3" id="z_m_2">
                                        <a href="javascript:void(0);" class="pre_menu_link" draggable="false">
                                            <i class="icon_menu_dot js_icon_menu_dot dn" style="display: none;"></i>
                                            <i class="icon20_common sort_gray"></i>
                                            <span class="js_l1Title">菜单名称</span>
                                        </a>
                                        <div class="sub_pre_menu_box" style="display: none;">
                                            <ul class="sub_pre_menu_list">
                                                <li class="js_addMenuBox add_menu2">
                                                    <a href="javascript:void(0);" class="jsSubView" title="添加子菜单" draggable="false">
                                           <span class="sub_pre_menu_inner js_sub_pre_menu_inner">
                                           <i class="icon16_common add_gray"></i></span>
                                                    </a>
                                                </li>
                                            </ul>
                                            <i class="arrow arrow_out"></i>
                                            <i class="arrow arrow_in"></i>
                                        </div>
                                    </li>
                                    <li class="jsMenu pre_menu_item jslevel1 size1of3" id="z_m_3">
                                        <a href="javascript:void(0);" class="pre_menu_link" draggable="false">
                                            <i class="icon_menu_dot js_icon_menu_dot dn" style="display: none;"></i>
                                            <i class="icon20_common sort_gray"></i>
                                            <span class="js_l1Title">菜单名称</span>
                                        </a>
                                        <div class="sub_pre_menu_box" style="display: none;">
                                            <ul class="sub_pre_menu_list">
                                                <li class="js_addMenuBox add_menu2">
                                                    <a href="javascript:void(0);" class="jsSubView" title="添加子菜单" draggable="false">
                                           <span class="sub_pre_menu_inner js_sub_pre_menu_inner">
                                           <i class="icon16_common add_gray"></i></span>
                                                    </a>
                                                </li>
                                            </ul>
                                            <i class="arrow arrow_out"></i>
                                            <i class="arrow arrow_in"></i>
                                        </div>
                                    </li>
                                    <li class="js_addMenuBox pre_menu_item add_menu1">
                                        <a href="javascript:void(0);" class="pre_menu_link" title="添加菜单" draggable="false">
                                            <i class="icon16_common add_gray"></i>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="menu_form_area">
                        <!----------------删除菜单的时候显示--------------------->
                        <div id="js_none" class="menu_initial_tips tips_global" style="display: none;">点击左侧菜单进行编辑操作</div>
                        <div id="js_rightBox" class="portable_editor to_left">
                            <div class="editor_inner">
                                <div class="global_mod float_layout menu_form_hd js_second_title_bar">
                                    <h4 class="global_info">
                                        菜单名称
                                    </h4>
                                    <div class="global_extra">
                                        <a href="javascript:void(0);" id="jsDelBt" data-toggle="modal" data-target="#myModal_del">删除菜单</a>
                                    </div>
                                </div>
                                <div class="menu_form_bd" id="view">
                                    <div id="js_innerNone" style="display: none;padding-top:10px;" class="msg_sender_tips tips_global">已添加子菜单，仅可设置菜单名称。</div>
                                    <div class="frm_control_group js_setNameBox">
                                        <label for="" class="frm_label">
                                            <strong class="title js_menuTitle">菜单名称</strong>
                                        </label>
                                        <div class="frm_controls">
                                     <span class="frm_input_box with_counter counter_in append">
                                        <input type="text" class="frm_input js_menu_name">
                                     </span>
                                            <p class="frm_msg fail js_titleEorTips" style="display: none;">字数超过上限</p>
                                            <p class="frm_msg fail js_titlenoTips" style="display: none;">请输入菜单名称</p>
                                            <p class="frm_tips js_titleNolTips">字数不超过4个汉字或8个字母</p>
                                        </div>
                                    </div>
                                    <!---------------------子菜单----------------------->
                                    <div class="frm_control_group" style="display: block;">
                                        <label for="" class="frm_label">
                                            <strong class="title js_menuContent">菜单内容</strong>
                                        </label>
                                        <div class="frm_controls frm_vertical_pt">
                                            <label class="frm_radio_label js_radio_sendMsg selected js_radio" id="js_sendMsg">
                                                <i class="icon_radio"></i>
                                                <span class="lbl_content">发送消息</span>
                                                <input type="radio" name="s_mess" class="frm_radio" checked="checked">
                                            </label>
                                            <label class="frm_radio_label js_radio_url js_radio" id="js_url">
                                                <i class="icon_radio"></i>
                                                <span class="lbl_content">跳转网页</span>
                                                <input type="radio" name="j_web" class="frm_radio">
                                            </label>
                                        </div>
                                    </div>
                                    <div class="menu_content_container">
                                        <div  class="menu_content send jsMain" id="edit">
                                            <div class="msg_sender" id="editDiv">
                                                <div class="msg_tab">
                                                    <div class="tab_navs_panel">
                                                        <div class="tab_navs_wrp">
                                                            <ul class="tab_navs js_tab_navs">
                                                                <li class="tab_nav tab_appmsg selected" data-tooltip="图文消息">
                                                                    <a href="javascript:void(0);">&nbsp;<i class="icon_msg_sender"></i><span class="msg_tab_title">图文消息</span></a>
                                                                </li>
                                                                <li class="tab_nav tab_text " data-tooltip="文字">
                                                                    <a href="javascript:void(0);">&nbsp;<i class="icon_msg_sender"></i><span class="msg_tab_title">文字</span></a>
                                                                </li>
                                                                <li class="tab_nav tab_img"  data-tooltip="图片">
                                                                    <a href="javascript:void(0);">&nbsp;<i class="icon_msg_sender"></i><span class="msg_tab_title">图片</span></a>
                                                                </li>
                                                                <li class="tab_nav tab_cardmsg" id="cardmsg" data-tooltip="卡券"  data-toggle="modal" data-target="#myModal">
                                                                    <a href="javascript:void(0);">&nbsp;<i class="icon_msg_sender"></i><span class="msg_tab_title">卡券</span></a>
                                                                </li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                    <div class="tab_panel">
                                                        <!-------------切换内容---------------->
                                                        <div class="tab_content" style="">
                                                            <div class="js_appmsgArea inner ">
                                                                <div class="tab_cont_cover jsMsgSendTab">
                                                                    <div class="MsgSend_box" style="display:none"><a href="#none" class="del_MsgSend">删除</a></div>
                                                                    <div class="MsgSend_media_box">
                                                                        <div class="media_cover" >
			                                      <span class="create_access">
			                                         <a class="add_gray_wrp jsMsgSenderPopBt" href="javascript:;"  data-toggle="modal" data-target="#myModal_sucai" onClick="getMorePic();">
                                                         <i class="icon36_common add_gray"></i>
                                                         <strong>从素材库中选择</strong>
                                                     </a>
			                                      </span>
                                                                        </div>
                                                                        <div class="media_cover">
			                                      <span class="create_access">
                                                      <a  class="add_gray_wrp" href="#none">
                                                          <i class="icon36_common add_gray"></i>
                                                          <strong>新建图文消息</strong>
                                                      </a>
			                                     </span>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="tab_content" style="display:none">
                                                            <div class="js_textArea inner no_extra">
                                                                <div class="emotion_editor">
                                                                    <div class="edit_area js_editorArea" contenteditable="true"></div>
                                                                    <div class="editor_toolbar">
                                                                        <a href="#" class="btn btn-primary" style="float:right; margin-left:10px; margin-top:6px;" id="save_text">保存</a>
                                                                        <p class="editor_tip js_editorTip">还可以输入<em>600</em>字</p>

                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="tab_content" style="display: none;">
                                                            <div class="js_imgArea inner ">
                                                                <div class="tab_cont_cover jsMsgSendTab" >
                                                                    <div class="MsgSend_media_box">
                                                                        <div class="media_cover">
			                                         <span class="create_access">
			                                            <a class="add_gray_wrp jsMsgSenderPopBt" href="javascript:;" data-toggle="modal" data-target="#myModal_sucai" onclick="getMorePic();">
                                                            <i class="icon36_common add_gray"></i>
                                                            <strong>从素材库中选择</strong>
                                                        </a>
			                                          </span>
                                                                        </div>
                                                                        <div class="media_cover">
			                                        <span class="create_access webuploader-container">
			                                            <a class="add_gray_wrp webuploader-pick"  href="javascript:;">
                                                            <i class="icon36_common add_gray"></i>
                                                            <strong>上传图片</strong>
                                                        </a>
			                                           <div style="position: absolute; top: 42px; left: 78.5px; width: 56px; height: 58px; overflow: hidden; bottom: auto; right: auto;"><input type="file" id="doc" style="opacity:0;" onchange="javascript:setImagePreview();">
                                                       </div>
                                                    </span>
                                                                        </div>
                                                                    </div>
                                                                    <div class="MsgSend_box" style="display:none"><a href="#none" class="del_MsgSend">删除</a></div>
                                                                    <div class="img_p_div" style="display:none;"><img id="preview" src=""><a href="#none" class="del_img" style="vertical-align:bottom;margin-left:20px;">删除</a></div>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="menu_content url jsMain" style="display:none;">
                                            <form action="#" id="urlForm" method="post">
                                                <p class="menu_content_tips tips_global">订阅者点击该子菜单会跳到以下链接</p>
                                                <div class="frm_control_group">
                                                    <label for="" class="frm_label">页面地址</label>
                                                    <div class="frm_controls">
                                                <span class="frm_input_box">
                                                    <input type="text" class="frm_input" id="urlText" name="urlText">
                                                </span>
                                                    </div>
                                                </div>
                                                <div class="frm_control_group btn_appmsg_wrap">
                                                    <div class="frm_controls">
                                                        <p class="frm_msg fail dn" id="urlUnSelect" style="display: none;">
                                                            <span for="urlText" class="frm_msg_content" style="display: inline;">请选择一篇文章</span>
                                                        </p>
                                                        <a href="javascript:;" id="js_appmsgPop">从公众号图文消息中选择</a>
                                                        <a href="javascript:void(0);" class="dn btn btn_default" id="js_reChangeAppmsg" style="display: none;">重新选择</a>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="c_s_box">
                    <input id="upload" class="c_s_btn" type="submit" value="保存" />
                </div>
            </div>
        </div>
    </div>
    </form>
</div>
<!----------------------------账户框---------------------------------->
<div class="m_popover  hide change_account">

    <div class="popover_title jsPopOverContent">
        <h2>修改账户</h2>
    </div>
    <div class="popover_content jsPopOverContent">
        <p><label>账户名称:</label><span class="account_name">22222</span></p>
        <p><label>原密码:</label><input class="ori_password change_account_input"/ type="password"></p>
        <p><label>新密码:</label><input class="new_password change_account_input"/ type="password"></p>
    </div>
    <div class="popover_bar"><a href="javascript:;" class="m_btn m_btn_primary jsPopoverBt" id="change_account_confirm">确定</a>&nbsp;<a href="javascript:;" class="m_btn m_btn_default jsPopoverBt" id="change_account_del">取消</a></div>

</div>
<!--------------删除菜单框------------------------>
<div class="modal fade" id="myModal_del" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="left:47%;width:613px; display:none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" style="margin-top:5px;"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel" style="color:#333;margin:5px 0">
                    温馨提示
                </h4>
            </div>
            <div class="modal-body" style="color:#333;height:200px;font-size:14px">
                <div class="msg_icon_wrapper">
                </div>
                <div>
                    <p>删除确认</p>
                    <p style="color:#8d8d8d">删除后"菜单名称"菜单下设置的内容将被删除</p>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">取消
                </button>
                <button type="button" class="btn btn-primary" id="js_confirm">
                    确定
                </button>
            </div>
        </div>
    </div>
</div>
<!------------------卡券---------------------------->
<div class="modal fade" id="myModal" aria-hidden="true" data-backdrop="true"  style="left:33%;width:960px;display:none;top:10%; position:absolute;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" style="margin-top:5px;"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel" style="color:#333;margin:5px 0">
                    选择卡券
                </h4>
            </div>
            <div class="modal-body" style="color:#333;font-size:14px;height:400px;padding:0px; overflow:auto;">
                <div class="js_card_list">
                    <div class="release_method js_card_container">
                        <div class="table_wrp release_method_select_table_wrp">
                            <table class="table" cellspacing="0">
                                <thead class="thead">
                                <tr>
                                    <th class="table_cell release_method_select_box">&nbsp;</th>
                                    <th class="table_cell release_method_kind"><div class="td_panel">卡券类型</div></th>
                                    <th class="table_cell release_method_name"><div class="td_panel">卡券名称</div></th>
                                    <th class="table_cell release_method_time"><div class="td_panel">卡券有效期</div></th>
                                    <th class="table_cell release_method_stock"><div class="td_panel">库存</div></th>
                                    <th class="table_cell release_method_price"><div class="td_panel">微信价(元)</div></th>
                                    <!-- <th class="table_cell release_method_preview"><div class="td_panel">预览</div></th> -->
                                    <th class="table_cell release_method_state"><div class="td_panel">卡券状态</div></th>
                                </tr>
                                </thead>
                                <tbody class="tbody">
                                <tr class="" id="js_ct_tr_p5A-htxMPj43GCNV9fblVBQa06cA">
                                    <td class="table_cell release_method_select_box"><div class="td_panel">
                                        <label class="frm_radio_label" for="checkbox1">
                                            <i class="icon_radio"></i>
                                            <input type="radio" data-id="p5A-htxMPj43GCNV9fblVBQa06cA" value="p5A-htxMPj43GCNV9fblVBQa06cA" class="frm_radio js_select js_select_disabled_2" id="checkbox1">
                                        </label>
                                    </div></td>
                                    <td class="table_cell release_method_kind"><div class="td_panel">代金券</div></td>
                                    <td class="table_cell release_method_name"><div class="td_panel">代金券标题</div></td>
                                    <td class="table_cell release_method_time"><div class="td_panel">2015-11-27至2015-12-15</div></td>
                                    <td class="table_cell release_method_stock"><div class="td_panel"><span class="js_sendcard_quantity">0</span>
                                        <a class="icon14_common edit_gray js_modify_quantity" href="javascript:;" id="editor_1"></a></div>
                                    </td>
                                    <td class="table_cell release_method_price"><div class="td_panel">--</div></td>
                                    <!-- <td class="table_cell release_method_preview"><div class="td_panel"><a data-cid="p5A-htxMPj43GCNV9fblVBQa06cA" data-x="-125" class="js_card_preview" href="javascript:void(0);">预览</a></div></td> -->
                                    <td class="table_cell release_method_state"><div class="td_panel"><span class="fail pass"><i></i>已投放</span></div></td>
                                </tr>

                                <tr class="" id="js_ct_tr_p5A-htzDAaNP8P6FFlabXDMrJEOg">
                                    <td class="table_cell release_method_select_box"><div class="td_panel">

                                        <label class="frm_radio_label" for="checkbox2">
                                            <i class="icon_radio"></i>
                                            <input type="radio" data-id="p5A-htzDAaNP8P6FFlabXDMrJEOg" value="p5A-htzDAaNP8P6FFlabXDMrJEOg" class="frm_radio js_select js_select_disabled_2" id="checkbox2">
                                        </label>

                                    </div></td>
                                    <td class="table_cell release_method_kind"><div class="td_panel">团购券</div></td>
                                    <td class="table_cell release_method_name"><div class="td_panel">ZARA羽绒服199元</div></td>
                                    <td class="table_cell release_method_time"><div class="td_panel">2015-12-16至2015-12-30</div></td>
                                    <td class="table_cell release_method_stock"><div class="td_panel"><span class="js_sendcard_quantity">3</span>
                                        <a class="icon14_common edit_gray js_modify_quantity" href="javascript:;" id="editor_2"></a></div>
                                    </td>
                                    <td class="table_cell release_method_price"><div class="td_panel">--</div></td>
                                    <!-- <td class="table_cell release_method_preview"><div class="td_panel"><a data-cid="p5A-htzDAaNP8P6FFlabXDMrJEOg" data-x="-125" class="js_card_preview" href="javascript:void(0);">预览</a></div></td> -->
                                    <td class="table_cell release_method_state"><div class="td_panel"><span class="fail pass"><i></i>待投放</span></div></td>
                                </tr>

                                <tr class="" id="js_ct_tr_p5A-ht5TDIVJWERWgq-h5HVBpsrA">
                                    <td class="table_cell release_method_select_box"><div class="td_panel">

                                        <label class="frm_radio_label" for="checkbox3">
                                            <i class="icon_radio"></i>
                                            <input type="radio" data-id="p5A-ht5TDIVJWERWgq-h5HVBpsrA" value="p5A-ht5TDIVJWERWgq-h5HVBpsrA" class="frm_radio js_select js_select_disabled_2" id="checkbox3">
                                        </label>

                                    </div></td>
                                    <td class="table_cell release_method_kind"><div class="td_panel">兑换券</div></td>
                                    <td class="table_cell release_method_name"><div class="td_panel">小礼品一份</div></td>
                                    <td class="table_cell release_method_time"><div class="td_panel">领取后当天生效3天有效</div></td>
                                    <td class="table_cell release_method_stock"><div class="td_panel"><span class="js_sendcard_quantity">3</span>
                                        <a class="icon14_common edit_gray js_modify_quantity" href="javascript:;" id="editor_3"></a></div>
                                    </td>
                                    <td class="table_cell release_method_price"><div class="td_panel">--</div></td>
                                    <!-- <td class="table_cell release_method_preview"><div class="td_panel"><a data-cid="p5A-ht5TDIVJWERWgq-h5HVBpsrA" data-x="-125" class="js_card_preview" href="javascript:void(0);">预览</a></div></td> -->
                                    <td class="table_cell release_method_state"><div class="td_panel"><span class="fail pass"><i></i>待投放</span></div></td>
                                </tr>

                                <tr class="" id="js_ct_tr_p5A-ht8Fmzbw_Qa9azvy4O0I1uoE">
                                    <td class="table_cell release_method_select_box"><div class="td_panel">

                                        <label class="frm_radio_label" for="checkbox4">
                                            <i class="icon_radio"></i>
                                            <input type="radio" data-id="p5A-ht8Fmzbw_Qa9azvy4O0I1uoE" value="p5A-ht8Fmzbw_Qa9azvy4O0I1uoE" class="frm_radio js_select js_select_disabled_2" id="checkbox4">
                                        </label>

                                    </div></td>
                                    <td class="table_cell release_method_kind"><div class="td_panel">代金券</div></td>
                                    <td class="table_cell release_method_name"><div class="td_panel">任意商品抵扣10元</div></td>
                                    <td class="table_cell release_method_time"><div class="td_panel">领取后当天生效3天有效</div></td>
                                    <td class="table_cell release_method_stock"><div class="td_panel"><span class="js_sendcard_quantity">2</span>
                                        <a class="icon14_common edit_gray js_modify_quantity" href="javascript:;" id="editor_4"></a></div>
                                    </td>
                                    <td class="table_cell release_method_price"><div class="td_panel">--</div></td>
                                    <!-- <td class="table_cell release_method_preview"><div class="td_panel"><a data-cid="p5A-ht8Fmzbw_Qa9azvy4O0I1uoE" data-x="-125" class="js_card_preview" href="javascript:void(0);">预览</a></div></td> -->
                                    <td class="table_cell release_method_state"><div class="td_panel"><span class="fail pass"><i></i>待投放</span></div></td>
                                </tr>

                                <tr class="" id="js_ct_tr_p5A-ht6VN7vnQ3HxPPLFpag3VfDI">
                                    <td class="table_cell release_method_select_box"><div class="td_panel">

                                        <label class="frm_radio_label" for="checkbox5">
                                            <i class="icon_radio"></i>
                                            <input type="radio" data-id="p5A-ht6VN7vnQ3HxPPLFpag3VfDI" value="p5A-ht6VN7vnQ3HxPPLFpag3VfDI" class="frm_radio js_select js_select_disabled_2" id="checkbox5">
                                        </label>

                                    </div></td>
                                    <td class="table_cell release_method_kind"><div class="td_panel">折扣券</div></td>
                                    <td class="table_cell release_method_name"><div class="td_panel">进店吉祥为您2折</div></td>
                                    <td class="table_cell release_method_time"><div class="td_panel">领取后当天生效3天有效</div></td>
                                    <td class="table_cell release_method_stock"><div class="td_panel"><span class="js_sendcard_quantity">11</span>
                                        <a class="icon14_common edit_gray js_modify_quantity" href="javascript:;" id="edit_gray_5"></a></div>
                                    </td>
                                    <td class="table_cell release_method_price"><div class="td_panel">--</div></td>
                                    <!-- <td class="table_cell release_method_preview"><div class="td_panel"><a data-cid="p5A-ht6VN7vnQ3HxPPLFpag3VfDI" data-x="-125" class="js_card_preview" href="javascript:void(0);">预览</a></div></td> -->
                                    <td class="table_cell release_method_state"><div class="td_panel"><span class="fail pass"><i></i>待投放</span></div></td>
                                </tr>


                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal" id="js_del_ka">取消
                </button>
                <button type="button" class="btn btn-primary" id="js_confirm_ka">
                    确定
                </button>
            </div>
        </div>
    </div>
</div>
<!-----------卡券的蒙层---------------------------->
<div class="mask_ka"></div>
<!------------------卡券增加框---------------------------->
<div class="popover_k " style="position: fixed; left: 628.5px; top:0px; z-index: 10000;">
    <div class="popover_inner">
        <div class="popover_content">
            <div class="pop_store">
                <!-- 普通卡券增减库存 -->
                <div class="pop_card_normal">
                    <!--增减库存-->

                    <!-- 这一部分貌似要废弃掉 -->
                    <div class="frm_control_group">
                        <div class="frm_controls">
                            <label class="frm_radio_label selected add" for="checkbox16">
                                <i class="icon_radio"></i>
                                <span class="lbl_content">增加</span>
                                <input type="radio" name="isadd" checked="" value="1" class="frm_radio js_quantity_type" id="checkbox16">
                            </label>
                            <label class="frm_radio_label reduce" for="checkbox17">
                                <i class="icon_radio"></i>
                                <span class="lbl_content">减少</span>
                                <input type="radio" name="isadd" value="0" class="frm_radio js_quantity_type" id="checkbox17">
                            </label>
                        </div>
                    </div>

                    <div class="frm_control_group" style="padding-bottom: 0px;">
                        <div class="frm_controls">
                            <div class="frm_controls_hint group">
                                <span class="frm_input_box"><input type="text" class="frm_input stock_input"></span>
                                <span class="frm_hint">份</span>
                            </div>
                            <p class="frm_tips fail">库存不能少于1</p>
                        </div>
                    </div>
                    <!--增减库存 end-->
                </div>

            </div>
        </div>

        <div class="popover_bar">

            <a onclick="return false;" href="javascript:;" class="js_btn btnn btn_primary j_con_k" style="float:left">确定</a>

            <a onclick="return false;" href="javascript:;" class="js_btn btnn btn_default j_del_c" style="float:right">取消</a>

        </div>

    </div>
    <i class="popover_arrow popover_arrow_out"></i>
    <i class="popover_arrow popover_arrow_in"></i>
</div>
<!------------提示框------------->
<div class="result_tips"></div>
<!-----素材库------------------------>
<div class="modal fade" id="myModal_sucai" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="left:50%;width: 960px;margin-left: -480px;display:none; top:0px;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" style="margin-top:5px;"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel" style="color:#333;margin:5px 0;">
                    选择素材
                </h4>
                <div class="sub_title_bar in_dialog">
                    <div class="search_bar">
            <span class="frm_input_box search with_del append">
                <a class="del_btn" href="javascript:" id="searchCloseBt"><i class="icon_search_del"></i>&nbsp;</a>
                <a id="msgSearchBtn" href="javascript:" class="frm_input_append"><i class="icon16_common search_gray">搜索</i>&nbsp;</a>
                <input id="msgSearchInput" type="text" placeholder="标题/作者/摘要" value="" class="frm_input">
            </span>
                    </div>
                    <div class="appmsg_create tr">
                        <a class="btn btn_primary btn_add" target="_blank" href="/cgi-bin/appmsg?t=media/appmsg_edit&amp;action=edit&amp;type=10&amp;isMul=1&amp;lang=zh_CN&amp;token=1700683375">
                            <i class="icon14_common add_white"></i>新建图文消息            </a>

                    </div>
                </div>
            </div>
            <div class="modal-body" style="color:#333;height:400px;font-size:14px;overflow-y:scroll;padding-top: 20px;padding-bottom: 20px;">
                <div id="content" class="ub-f1 tx-l t-bla ub-img6 res10" style="display: inline;">
                    <div id="forum_list">
                        <div class="outDiv" id="leftPic" style="margin-right:2%;">
                            <div class="blockLeft"  name="hello">
                                <div class="mask_page"></div>
                                <i class="icon_card_selected">已选择</i>
                                <img src="__TPLPATH__/Admin/CustomMenu/images/img_1.jpg" class="tuwen_img"/>
                            </div>
                        </div>
                        <div class="outDiv" id="rightPic">
                            <div class="blockRight" name="hello">
                                <div class="mask_page"></div>
                                <i class="icon_card_selected">已选择</i>
                                <img src="__TPLPATH__/Admin/CustomMenu/images/img_2.jpg" class="tuwen_img"/>
                            </div>
                        </div>
                        <!-- <div class="tuwen_list">
                           <img src="images/bg_02.png" class="tuwen_img"/>
                         </div> -->
                    </div>
                    <!--  <button class="foot" id="nextpage" onClick="getMorePic();">查看下8条</button>-->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">取消
                </button>
                <button type="button" class="btn btn-primary" id="js_con_sucai">
                    确定
                </button>
            </div>
        </div>
    </div>
</div>

</body>
<!--  <script src="js/zepto.js"></script>
  <script src="js/base64.js"></script>
  <script src="js/pic.js"></script>-->
<script>
    //用于瀑布流自动加载
    //兼容Android,iphone


    $(document).ready(function(e) {
        $("#forum_list").delegate(".blockLeft","click",function(event){
            $(".mask_page").hide();
            $(".icon_card_selected").hide()
            $(this).find(".mask_page").show();
            $(this).find(".icon_card_selected").show();
            $(".blockLeft").removeClass("check");
            $(".blockRight").removeClass("check");
            $(this).addClass("check");
            //console.log($("data-check=checked_img").length);

        })
        $("#forum_list").delegate(".blockRight","click",function(event){
            $(".mask_page").hide();
            $(".icon_card_selected").hide();
            $(this).find(".mask_page").show();
            $(this).find(".icon_card_selected").show();
            $(".blockLeft").removeClass("check");
            $(".blockRight").removeClass("check");
            $(this).addClass("check");
        })
        $("#forum_list").delegate(".blockLeft","mouseover mouseout",function(event){
            //alert(event.type);
            if (event.type == 'mouseover')
            {
                $(this).find(".mask_page").show();

            }
            else {
                if($(this).find(".icon_card_selected").is(":visible")){
                    $(this).find(".mask_page").show();
                }
                else{
                    $(this).find(".mask_page").hide();}
            }
        })
        $("#forum_list").delegate(".blockRight","mouseover mouseout",function(event){
            //alert(event.type);
            if (event.type == 'mouseover')
            {
                $(this).find(".mask_page").show();

            }
            else {
                if($(this).find(".icon_card_selected").is(":visible")){
                    $(this).find(".mask_page").show();
                }
                else{
                    $(this).find(".mask_page").hide();}
            }
        })
    })
</script>
<script>
    $(document).ready(function(){
        /*图文消息、图片发送*/
        $("#js_con_sucai").click(function(){
            var id=$(".menu_form_area").attr("data-id");//与菜单相对应的内容
            var menu_name=$(".js_menu_name").val();//子菜单名称
            var menu_type=$(".js_radio").find(":checked").attr("name");
            var type=$("#editDiv").find(".selected").attr("data-tooltip");
            var media_id=$("#forum_list").find(".check").attr("name");
            var pid=$("#"+id).parents(".jslevel1").attr("id");
            var name=$("#"+id).parents(".jslevel1").find(".js_l1Title").text();

            /*ajax发送相关数据*/
            $.ajax({
                type: "POST",
                url: "{:U('ajaxData')}",
                data: {"id": id, "menu_name": menu_name,"menu_type":menu_type,"type":type,"media_id":media_id,"pid":pid,"name":name},
                dataType: "json",
                success: function (json){
                    alert(json);
                }
            });

        });
        /*文字发送*/
        $("#save_text").click(function(){
            var id=$(".menu_form_area").attr("data-id");//与菜单相对应的内容
            var menu_name=$(".js_menu_name").val();//子菜单名称
            var menu_type=$(".js_radio").find(":checked").attr("name");
            var type=$("#editDiv").find(".selected").attr("data-tooltip");
            var pid=$("#"+id).parents(".jslevel1").attr("id");
            var key=$(".edit_area.js_editorArea").text();
            var name=$("#"+id).parents(".jslevel1").find(".js_l1Title").text();

            /*ajax发送相关数据*/
            $.ajax({
                type: "POST",
                url: "{:U('ajaxData')}",
                data: {"id": id, "menu_name": menu_name,"menu_type":menu_type,"type":type,"key":key,"pid":pid,"name":name},
                dataType: "json",
                success: function (json){
                    alert(json);
                }
            });

        });
        /*跳转网页*/
        $("#urlText").blur(function(){
            var id=$(".menu_form_area").attr("data-id");//与菜单相对应的内容
            var menu_name=$(".js_menu_name").val();//子菜单名称
            var menu_type=$(".js_radio").find(":checked").attr("name");
            var type=$("#editDiv").find(".selected").attr("data-tooltip");
            var pid=$("#"+id).parents(".jslevel1").attr("id");
            var url=$(this).val();
            var name=$("#"+id).parents(".jslevel1").find(".js_l1Title").text();

            /*ajax发送相关数据*/
            $.ajax({
                type: "POST",
                url: "{:U('ajaxData')}",
                data: {"id": id, "menu_name": menu_name,"menu_type":menu_type,"type":type,"url":url,"pid":pid,"name":name},
                dataType: "json",
                success: function (json){
                    alert(json);
                }
            });

        })

        /*保存并发布*/
        $("#upload").click(function(){
            var msg = 'hello';
            /*ajax发送相关数据*/
            $.ajax({
                type: "POST",
                url: "{:U('createMenu')}",
                data: {"msg": msg},
                dataType: "json",
                success: function (json){
                    alert(json);
                }
            });
        });
        //主菜单
        $("#menuList").delegate(".jsMenu","click",function(e) {
            var id=$(this).attr("id");
           // alert(id);
            /*ajax发送相关数据*/
            $.ajax({
                type: "POST",
                url: "{:U('getMenu')}",
                data: {"id": id},
                dataType: "json",
                success: function (json){
                    alert(json['name']);
                }
            });
        })
        $("#menuList").delegate(".jslevel2","click",function(e) {
            var id=$(this).attr("id");
            alert(id);
            /*ajax发送相关数据*/
            $.ajax({
                type: "POST",
                url: "{:U('getMenu')}",
                data: {"id": id},
                dataType: "json",
                success: function (json){
                    alert(json.id);
                }
            });
        })
        //子菜单


    })


</script>

<!--<script src="__TPLPATH__/Admin/CustomMenu/js/d_menu.js"></script>-->
</html>




